function populate_flight_sidebar_search(from_name, from , to_name, to, default_date)
{
	var hash_value = window.location.hash.replace('#','');
	var parameter = hash_value.split('&');
	
	if(from != '')
	{
		$('#from_input').val(from_name);
		$('#from').val(from);
	}
	
	if(to != '')
	{
		$('#to_input').val(to_name);
		$('#to').val(to);
	}
	
	if(parameter.length > 1 && parameter[1] != '')
	{
		//get depdate
		var depdate = parameter[0].split('=');
		var depdate = depdate[1];
		$('#depdate').val(depdate);

		//get retdate
		var retdate = parameter[1].split('=');
		var retdate = retdate[1];
		$('#retdate').val(retdate);

		//get adult
		var adult = parameter[3].split('=');
		var adult = adult[1];
		$('#adult').val(adult);

		//get child
		var child = parameter[4].split('=');
		var child = child[1];
		$('#child').val(child);

		//get infant
		var infant = parameter[5].split('=');
		var infant = infant[1];
		$('#infant').val(infant);

		//get returntype
		var type = parameter[6].split('=');
		var type = type[1];
		if(type == 'RT')
		{
			$('#pulangpergi').click();
		}
		else
		{
			$('#sekalijalan').click();
		}
	}	
	else
	{
		$('#sekalijalan').click();
		$('#depdate').val(default_date);
	}
	$('#pulangpergi').show();
	$('#sekalijalan').show();
}